<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
%>
<html>
<head>
    <title>个人中心-任务列表</title>
</head>
<body>
<table class="table">
    <thead>
    <tr>
        <th width="50">序号</th>
        <th width="150">索引图片</th>
        <th width="200">标题</th>
        <th width="150">状态</th>
        <th width="150">发布时间</th>
        <th width="100">操作</th>
    </tr>
    </thead>


    <c:forEach items="${requestScope.pageInfo.list}" var="task" varStatus="stat">
        <tr>
            <td  rowspan="2">
                <span class="pending">${stat.count}</span>
            </td>
            <td>
                <img style="margin-top:-8px" width="50px" height="50px" src="<%=path %>/web/userinfo/img/taskImages/${task.pic}">
            </td>
            <td class="manage-jobs-title"><a
                    href="<%=path%>/web/task/details?id=${task.id}"
                    target="_parent">${task.title}</a>
            </td>

            <c:if test="${task.enable eq true}" var="enable">
                <td class="manage-jobs-title">
                        ${task.mark.title}
                </td>
            </c:if>
            <c:if test="${not enable}">
                <c:if test="${task.enable eq null}">
                <td class="manage-jobs-title">
                        未审核
                </td>
                </c:if>
                <c:if test="${task.enable eq false}">
                    <td class="manage-jobs-title">
                        未通过
                    </td>
                </c:if>
            </c:if>

            <td class="table-date">
                <fmt:formatDate value="${task.inputTime}" pattern="yyyy-MM-dd"/>
            </td>
            <td>
                <c:if test="${(task.enable eq null)||(task.enable eq false)}">
                <a href="<%=path %>/web/userinfo/updateByTaskId?taskId=${task.id}" target="_parent"><img src="<%=path %>/web/userinfo/img/member_center/update.jpg" width="20px" height="20px"/></a>
                </c:if>
                <a href="javascript:void()" class="delete" data-id="${task.id}"><img src="<%=path %>/web/userinfo/img/member_center/delete.jpg" width="20px" height="20px"/></a>
            </td>
        </tr>
                    <tr class="wm-course-count">
                                        <td colspan="6">
                                            <div>
                                                <span>浏览：${task.browse}</span> <span>评论：${task.comments}</span>

                                            </div>
                                        </td>
                    </tr>
    </c:forEach>



    </tbody>
</table>
<!-- 分页 -->



<div class="pagination-box-row" style="bottom:0px;position:absolute;width:830px">

    <p>
    <div class="meneame">
        <%--            <c:if test="${requestScope.pageInfo.pageNum eq 1}" var="result">--%>
        <%--                <span class="disabled"> < </span>--%>
        <%--            </c:if>--%>
        <%--            <c:if test="${not result}">--%>
        <%--                <a href="" data-id="${requestScope.pageInfo.pageNum}> < </a>--%>
        <%--            </c:if>--%>

        <c:forEach begin="1" end="${requestScope.pageInfo.pages}" var="i">
            <c:if test="${requestScope.pageInfo.pageNum eq i}" var="isCur">
                <a class="current" data-id="${i}">${i}</a>
            </c:if>
            <c:if test="${not isCur}">
                <a href="#" data-id="${i}">${i}</a>
            </c:if>
        </c:forEach>
        <%--             <a href="#?page=2"> > </a>--%>
    </div>
    </p>

</div>
</body>
</html>
